//
// Created by Administrator on 2021/5/22.
//

#include "iostream"

using namespace std;

void swap(int num1, int num2){

    cout << "before exchange: " << endl;
    cout << "num1 = " << num1 << endl;
    cout << "num2 = " << num2 << endl;

    int temp = num1;
    num1 = num2;
    num2 = temp;

    cout << "after exchange: " << endl;
    cout << "num1 = " << num1 << endl;
    cout << "num2 = " << num2 << endl;

}

int main(){

    int a = 10;
    int b = 20;

    swap(a, b);

    system("pause");

    return 0;
}